package com.common;

/**
 * @Author：Luohuiyong
 * @Description:
 * @Date: Created in 14:20 2019/1/9
 */
public class Base {

    public Result error(String errmsg) {
        return new Result(errmsg, null);
    }

    public Result error(String errorCode, String errmsg) {
        return new Result(errorCode, errmsg, null);
    }

    public Result error(String errorCode, String errmsg, Object object) {
        return new Result(errorCode, errmsg, object);
    }


    public static Result success(){
        return new Result("200","成功");
    }

    /*public Result<T> success(T object) {
        return new Result(200, "成功", object);
    }*/


//    public Result success() {
//        return success("OK");
//    }

//    public Result success(String msg) {
//        return new Result(Constants.SUCCESS, msg, null);
//    }

//    public Result success(Object object) {
//        return new Result(Constants.SUCCESS, "OK", object);
//    }

}
